<template>
  <div>
    <h3>这是第十五个demo:回顾ts</h3>
    <!-- <p>今天是一个{{weather}}</p> -->
    <p>我叫{{ person.name }}，今年{{ person.age }}岁，性别{{ person.sex }}，爱好{{ person.hobby }}</p>
  </div>
</template>

<script setup lang='ts' name="Demo15">
import { ref, reactive } from 'vue'
import { type Person, type newPerson, type happy } from '@/types/demo15.ts'

// let weather:string = ref('天气');
function fn5<T extends happy>(a: T): T {
  return a;
}
console.log(fn5({ jump: "哈哈哈哈哈哈哈哈哈" }))
let person: Person = {
  name: "猪八戒",
  age: 200,
  sex: '男',
  hobby: '嫦娥'
}

let personList: newPerson = [
  {
    name: "猪八戒",
    age: 200,
    sex: '男',
    hobby: '嫦娥'
  },
  {
    name: "猪八戒",
    age: 200,
    sex: '男',
    hobby: '嫦娥'
  },
  {
    name: "猪八戒",
    age: 200,
    sex: '男',
    hobby: '嫦娥'
  }
]


</script>


<style lang='scss' scoped></style>